package com.candykingdom.events
{
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.events.TouchEvent;
	import flash.geom.Point;
	
	public class ControlEvent extends Event
	{
		public static const DOWN:String = "control_down";
		public static const UP:String = "control_up";
		public static const MOVE:String = "control_move";
		public static const CLICK:String = "control_click";
		public static const OVER:String = "control_over";
		public static const OUT:String = "control_out";
		public static const ROLL_OVER:String = "control_roll_over";
		public static const ROLL_OUT:String = "control_roll_out";
		public static const DRAG_START:String = "control_drag_start";
		public static const DRAG_MOVE:String = "control_drag_move";
		public static const DRAG_STOP:String = "control_drag_stop";
		public static const DRAG_CAST:String = "control_drag_cast";
		
		private var _data:Object = new Object();
		public function ControlEvent(type:String, data:Object, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			_data = data;
			super(type, bubbles, cancelable);
		}
		
		/** 开始点 */
		public function get startPoint():Point {return _data.startPoint;}
		/** 结束或移动点 */
		public function get endPoint():Point {return _data.endPoint;}
		/** 方向 0为上，1为下，2为左，3为右 */
		public function get direction():int {return _data.direction;}
		
		public function get localX():Number{return _data.localX;}
		public function get localY():Number{return _data.localY;}
		public function get stageX():Number{return _data.stageX;}
		public function get stageY():Number{return _data.stageY;}
		
		public function get pressure():Number{return _data.pressure;}
		public function get timestamp():Number{return _data.timestamp;}
		public function get touchPointID():int{return _data.touchPointID;}
		public function get sizeX():Number{return _data.sizeX;}
		public function get sizeY():Number{return _data.sizeY;}
	}
}